package com.example.demo.api;

import com.example.demo.api.factory.RemoteStorageFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value="seata-storage", fallbackFactory = RemoteStorageFallbackFactory.class)
public interface RemoteStorageService {
    @PostMapping("storage/deduct")
    ResponseEntity deduct(@RequestParam("commodityCode") String commodityCode,@RequestParam("count") int count);
}
